package com.xju.admin.utils;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

public class SecurityUserHelper {

    public static Authentication getCurrentUserAuthentication(){
        return SecurityContextHolder.getContext().getAuthentication();
    }

    public static Object getCurrentUser(){
        return getCurrentUserAuthentication().getPrincipal();
    }
}
